package com.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * Vain Description...
 *
 * @author : DJZhu
 */
public class DateUtils {

    // String u[] = {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
    //String u[] = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
    private final static String MONTH_UPPER_STR_ARR[] = {"一","二","三","四","五","六","七","八","九","十","十一","十二"};


    public static String upperToLower(String str){
        str = str.replace("月","");
        for (int i = 0; i < MONTH_UPPER_STR_ARR.length; i++){
            str = str.replace(MONTH_UPPER_STR_ARR[MONTH_UPPER_STR_ARR.length - i -1],String.valueOf(MONTH_UPPER_STR_ARR.length - i));
        }
        return str;
    }

    public String lowerToUpper(){
        return null;
    }

    public static void main(String [] args) throws ParseException {
        System.out.println(DateUtils.upperToLower("2016" + "-" + "三月" + "-" + "28"));
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        System.out.println(simpleDateFormat.parse(DateUtils.upperToLower("2016" + "-" + "三月" + "-" + "28")));
    }

}
